package com.action.member;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.controller.Action;
import com.dao.MemberDao;

public class LoginProAction implements Action{
	@Override
	public String execute(HttpServletRequest request,
			HttpServletResponse response) throws Exception {

		String mem_id = request.getParameter("mem_id");
		String passwd = request.getParameter("passwd");

		MemberDao dao = MemberDao.getinstance();

		int check = dao.userCheck(mem_id, passwd);

		if(check==1){

			HttpSession session = request.getSession();
			session.setAttribute("mem_id", mem_id);
		}
		request.setAttribute("check", check);

		return "/view/member/loginPro.jsp";
	}
}
